package com.easemob.server.example.comm.body;

import com.easemob.server.example.comm.wrapper.BodyWrapper;
import com.fasterxml.jackson.databind.node.ContainerNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;

public class NewOwnerBody implements BodyWrapper {

	private String users;

    public NewOwnerBody(String users) {
        this.users = users;
    }

    public String getUsers() {
        return users;
    }

    public void setUsers(String users) {
        this.users = users;
    }
	
	@Override
	public ContainerNode<?> getBody() {
		ObjectNode body = JsonNodeFactory.instance.objectNode();
        //ArrayNode names = JsonNodeFactory.instance.arrayNode();
        body.put("newowner", users);

        return body;
	}

	@Override
	public Boolean validate() {
		return null != users;
	}

}
